package demo3;

/**
 * @Author liangzai
 * @Description:
 */
public class Test {
    public static void main(String[] args) {
        int k = 3;
        int[] arr = {1,2,3,4,5,6,7};
        int n = arr.length;
        int[] newarr = new int[n];
        for (int i = 0; i < n; i++) {
            newarr[(k+i)%n] = arr[i];
        }
        arr = newarr;
        for (int i = 0; i < n; i++) {
            System.out.print(arr[i]);
        }
        for (int i = 0; i < n; i++) {
            System.out.print(newarr[i]);
        }
    }
}
